package cn.janescott.inner.space.lib.support.pagination;

import java.util.List;

/**
 * 分页排序对象
 * Created by Scott on 2018/5/15
 */
public class PaginationDTO implements java.io.Serializable {
    /**
     * 总数
     */
    private int total;

    /**
     * 每页大小
     */
    private int size;

    /**
     * 页码
     */
    private int page;

    /**
     * 排序
     */
    private List<OrderDTO> orders;

    public int getTotal() {
        return total;
    }

    public void setTotal(int total) {
        this.total = total;
    }

    public int getSize() {
        return size;
    }

    public void setSize(int size) {
        this.size = size;
    }

    public int getPage() {
        return page;
    }

    public void setPage(int page) {
        this.page = page;
    }

    public List<OrderDTO> getOrders() {
        return orders;
    }

    public void setOrders(List<OrderDTO> orders) {
        this.orders = orders;
    }

    public PaginationDTO() {
    }

    public static PaginationDTO defaultPagination() {
        PaginationDTO paginationDTO = new PaginationDTO();
        paginationDTO.setSize(20);
        paginationDTO.setPage(1);
        return paginationDTO;
    }
}
